import type {Route} from '../index.type'
import Layout from '@/layout/index.vue'
import {createNameComponent} from '../createNode'

const route: Route[] = [
	{
		path: '/document',
		component: Layout,
		redirect: '/document/intro',
		meta: {title: 'message.menu.document.name', icon: 'sfont system-document'},
		children: [
			{
				path: 'keep-alive',
				component: createNameComponent(() => import('@/views/main/document/keepAlive.vue')),
				meta: {title: 'message.menu.document.keepAlive'}
			},
			{
				path: 'theme',
				component: createNameComponent(() => import('@/views/main/document/theme.vue')),
				meta: {title: 'message.menu.document.theme'}
			},
			{
				path: 'api',
				component: createNameComponent(() => import('@/views/main/document/api.vue')),
				meta: {title: 'message.menu.document.api'}
			},
		]
	}
]

export default route